//
//  FaLvViewController.swift
//  xdjcy
//
//  Created by Henry on 15/12/17.
//  Copyright (c) 2015年 Henry. All rights reserved.
//

import UIKit

class FaLvViewController: WMPageController {

    
    var progress:MBProgressHUD!
    var typeList:Array<TypeModel> = Array<TypeModel>()
    
    required init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        typeList = BaseType.sharedInstance.fl_typeList!
        var classArray = NSMutableArray()
        var keyArray = NSMutableArray()
        var valueArray = NSMutableArray()
        var typeNameArray = NSMutableArray()
        for var i = 0; i < self.typeList.count; i++
        {
            typeNameArray.addObject(self.typeList[i].typeName!)
            classArray.addObject(NewsTableViewController.self)
            keyArray.addObject("templateName")
            valueArray.addObject(self.typeList[i].typeCode!)
        }
        self.viewControllerClasses = classArray as [AnyObject]
        self.titles = typeNameArray as [AnyObject]
        self.menuItemWidth = 80;
        self.menuViewStyle = WMMenuViewStyleLine;
        self.titleSizeSelected = 15.0;
        self.keys = keyArray as [AnyObject]
        self.values = valueArray as [AnyObject]
        
    }
    

    override func viewDidLoad() {
        super.viewDidLoad()


        let frameTop = self.navigationController?.navigationBar.bounds.height
        let frameBottom = self.tabBarController!.tabBar.bounds.height
        self.viewFrame =  CGRectMake(0, 64, self.view.bounds.width, self.view.bounds.height - 64 - self.tabBarController!.tabBar.bounds.height)
        //eg.这句话用于去掉push进去后下一个页面导航栏后退的文字
        //需要在push之前调用
        self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.Plain, target: nil, action: nil)
        
        self.navigationController?.navigationBar.tintColor =  UIColor.whiteColor()

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
